<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:g="http://giava.by/common/base"
	template="/WEB-INF/layout/t.xhtml">

	<ui:define name="title">
		<h:outputText value="Gestione Categore Faq" />
	</ui:define>
	<ui:define name="roles">
		<f:attribute name="roles" value="faq" />
	</ui:define>

	<ui:define name="content">
		<center>
			<p:panel header="Gestione Categoria Faq">
				<h:panelGrid columns="2" style="width: 95%">
					<h:outputLabel for="name" value="Nome (*):" style="width: 100%;" />
					<h:outputText id="name"
						value="#{faqCategoryController.element.name}" style="width: 100%;" />

					<h:outputLabel for="description" value="Descrizione:"
						style="width: 100%;" />
					<h:outputText id="description"
						value="#{faqCategoryController.element.description}"
						style="width: 100%;" />

					<h:outputLabel value="Immagine:" for="image"
						rendered="#{not empty faqCategoryController.element.image}" />
					<h:graphicImage id="image"
						value="/img/#{faqCategoryController.element.image.filename}"
						alt="#{faqCategoryController.element.image.filename}"
						title="#{faqCategoryController.element.image.filename}"
						style="padding: 5px;"
						rendered="#{not empty faqCategoryController.element.image}" />
				</h:panelGrid>
				<br />
			</p:panel>
			<br /> <br />
			<h:panelGrid columns="3">
				<h:form>
					<h:commandButton action="#{faqCategoryController.modCurrent}"
						value="Modifica Testi" />
					<h:commandButton action="#{faqCategoryController.modImageCurrent}"
						value="Modifica Immagine" />
					<h:commandButton id="addElement"
						action="#{faqCategoryController.addElement}" value="Aggiungi" />
				</h:form>
			</h:panelGrid>
		</center>

	</ui:define>
</ui:composition>